<<extend name="Common@Layout:layui-admin" />
<block name="title">
    <title>编辑用户</title>
</block>
<block name="style">
    <style>
        .layui-fixbar {
            display: none;
        }
    </style>
</block>

<block name="main">

    <form class="layui-form close-dialog" action="/admin/article/artic_edit_post">
        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input" value="{$info.title}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">作者</label>
            <div class="layui-input-block">
                <input type="text" name="userline" required lay-verify="required" placeholder="请输入作者姓名" autocomplete="off" class="layui-input" value="{$info.userline}">
            </div>
        </div>

        <php>
            $types = array(3=>'最新动态',5=>'影响力',6=>'风采');
        </php>
        <div class="layui-form-item">
            <label class="layui-form-label">选择框</label>
            <div class="layui-input-block">
                <select name="city" lay-verify="required">
        <foreach name="types" item="vo" key="k">
        	<option value="{$k}" <if condition="$info.artsort_id eq $k ">selected</if>>{$vo}</option>
        </foreach>
      </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="radio" name="state" value="1" title="正常" <if condition="$info.state eq 1 ">checked</if>>
                <input type="radio" name="state" value="0" title="锁定中" <if condition="$info.state eq 0 ">checked</if>>
            </div>
        </div>



        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="hidden" name="id" value="{$info.id}">
                <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>

            </div>
        </div>
    </form>
</block>
<block name="script">
    <script>
        //Demo
        layui.use('form', function() {
            var form = layui.form();

            //监听提交
            form.on('submit(formDemo)', function(data) {
                layer.msg(JSON.stringify(data.field));
                return false;
            });
        });
    </script>
</block>